<?php
  $username = "YOUR_DNSOMATIC_USERNAME"; //Username to OpenDNS (DNS-O-Matic) Server
  $password = "YOUR_DNSOMATIC_PASSWORD"; //Password to OpenDNS (DNS-O-Matic) Server
  $dnsOMaticURL = "wget --quiet --no-check-certificate -O OUTPUTFILE https://username:password@updates.dnsomatic.com/nic/update";
  $tempPath = tempnam("/tmp/", "LD_OD_DM_AUTO");
  
  $dnsOMaticURL = str_replace("username",$username,$dnsOMaticURL);
  $dnsOMaticURL = str_replace("password", $password, $dnsOMaticURL);
  $dnsOMaticURL = str_replace("OUTPUTFILE", $tempPath, $dnsOMaticURL);
  
  shell_exec($dnsOMaticURL);
  
  $handle = @fopen($tempPath, "r");
  $contents = @fread($handle, filesize($tempPath));
  @fclose($handle);
  
  if (strpos($contents,"good")>-1)
  {
      $output = explode(" ",$contents);
      echo "Your new IP Address $output[1] has been submitted to DNS-O-Matic.";            
  }
  else 
  {
     echo "The request could not be completed. Make sure you are authentication credentials in \$username and \$password variables are correct and you are connection to the Internet is working properly.";
     echo $contents;
  }
  
  @unlink ($tempPath); 
  echo "\r\n\r\n";
?>